﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace Fitts__law_experiment_with_a_wiimote
{
    public partial class IntroductionForm : Form
    {
        private bool dontExit = false;
        public IntroductionForm()
        {
            InitializeComponent();
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void acceptCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            startButton.Enabled = acceptCheckBox.Checked;
        }

        private void IntroductionForm_Load(object sender, EventArgs e)
        {
            introductionRichTextBox.LoadFile("introduction.rtf");
        }

        private void startButton_Click(object sender, EventArgs e)
        {
            dontExit = true;
            Close();
			//ExperimentForm form = new ExperimentForm();
			//form.Show();
			PracticeForm form = new PracticeForm();
			form.Show();
        }

        private void IntroductionForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (!dontExit)
                Application.Exit();
        }

        private void introductionRichTextBox_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
